<!doctype>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Start</title>
<style type="text/css">
body{margin:0;font-size:12px;line-height:180%;color:#666;font-family:Tahoma;background-image:url("/assets/images/startbg.png");}
h3{font-size:14px;line-height:200%;margin:0;}
ul{margin:0;padding:0;list-style:none;}
li{padding:0;list-style:none;}
a{color:#368AFC;text-decoration:none;}
a:hover{text-decoration:underline;}
a:visited{}

.col{width:180px;background:rgba(244, 249, 255, 0.8);float:left;margin:5px 0 0 5px;padding:0 0 10px;}
.col h3{background:rgba(220, 234, 255, 0.9);padding:0 15px;}
.col ul{padding:10px 15px 0;}

.clear{height:0;font-size:0;line-height:0;clear:both;}

#main{width:930px;margin:0 auto;padding:15px 15px 20px;border:2px rgba(244, 249, 255, 0.8) solid;-moz-box-shadow:2px 2px 2px rgba(0, 0, 0, 0.2);-webkit-box-shadow:2px 2px 2px rgba(0, 0, 0, 0.2);box-shadow:2px 2px 2px rgba(0, 0, 0, 0.2);background:rgba(255, 255, 255, 0.7);}
#topV{font-size:14px;line-height:180%;}
#topV.col{float:none; width:920px;}
#topV h3{font-size:16px;line-height:220%;}
#topV li{width:220px;float:left;}
</style>
</head>
<body>
<div id="main">
  <div id="search">
    <h3>Search</h3>
    <form method="get" action="http://www.google.com/search" id="searchForm" target="_blank">
      <input type="text" id="searchTxt" name="q"/>
      <select id="selSupplier">
        <option value="google">Google</option>
        <option value="bingcn">Bing CN</option>
        <option value="bing">Bing</option>
        <option value="googlehk">Google HK</option>
      </select>
      <button type="submit">提交</button>
    </form>
  </div>
  <script type="text/javascript">
    var sel = document.getElementById('selSupplier');
    var sform = document.getElementById('searchForm');
    var stxt = document.getElementById('searchTxt');
    
    sel.onchange = function(){
      var ssup;
      switch(sel.value){
        case 'bing':
          ssup = 'http://www.bing.com/search';
          break;
        case 'bingcn':
          ssup = 'http://cn.bing.com/search';
          break;
        case 'google':
          ssup = 'http://www.google.com/search';
          break;
        case 'googlehk':
          ssup = 'http://www.google.com.hk/search';
          break;
      }
      sform.action = ssup;
    }
  </script>
  <div id="stock">
    <h3>Google Stock Search</h3>
    <form method="get" action="http://www.google.com.hk/finance" target="_blank">
      <input type="text" name="q"/>
      <select name="hl">
        <option value="zh-CN">语言：中文</option>
      </select>
      <button type="submit">提交</button>
    </form>
  </div>
  <div id="topV" class="col">
    <h3>Top Visited</h3>
    <ul>
      {% for tv in top_visited %}<li><a href="/start/go/{{ tv.key }}" target="_blank">{{ tv.title }}</a></li>{% endfor %}
    </ul>
    <div class="clear"></div>
  </div>
{% for startlist in startlists %}
  <div class="col">
    <h3>{{ startlist.catalog }}</h3>
    <ul>
      {% for bookmark in startlist.bookmarks %}<li><a href="/start/go/{{ bookmark.key }}" target="_blank">{{ bookmark.title }}</a></li>{% endfor %}
    </ul>
    <div class="clear"></div>
  </div>
{% endfor %}
  <div class="clear"></div>
</div>
</body>
</html>